type IFiledMap = {
  [key: string]: any;
};

type FT1 = {
  [key: string]: any;
};

type OptionMap = {
  [key: number]: string;
};

function menuType() {
  const res: IFiledMap = {
    CATALOG: {label: "目录", value: "CATALOG", tC: "warning"},
    MENU: {label: "菜单", value: "MENU", tC: "success"},
    BUTTON: {label: "按钮", value: "BUTTON", tC: "danger"},
    EXTLINK: {label: "外链", value: "EXTLINK", tC: "info"},
  };

  return res;
}

function genderOptions() {
  const res: OptionMap = {
    1: "男",
    2: "女",
    0: "未知",
  };

  return res;
}

/**
 * 会员标签
 */
function memberTypeOpts() {

  const res: OptionMap = {
    0: "无",
    2: "职工",
    1: "非职工",
  };

  return res;
}


/**
 * 会员标签
 */
function memberLabelOpts() {

  const res: OptionMap = {
    // 0: "游客",
    1: "就诊人员",
    2: "在职职工",
    // 3: "教师",
    // 4: "学生",
    5: "其他",
  };

  return res;
}

/**
 * 店铺访问权限
 */
function shopRoleOpts() {

  const res: OptionMap = {
    0: "不限",
    1: "就诊人员",
    2: "在职职工",
    // 3: "教师",
    // 4: "学生",
    5: "其他",
  };

  return res;
}

/*打印机类型*/
function printerTypeOpts() {
  const res: OptionMap = {
    1: "订单机",
    2: "标签机",
  };

  return res;
}

function statusOpt1() {
  const res: IFiledMap = {
    2: {title: "已结束", type: "default"},
    1: {title: "启用", type: "success"},
    0: {title: "草稿", type: "danger"},
  };

  return res;
}

function statusOpt2() {
  const res: IFiledMap = {
    2: {title: "已结束", type: "danger"},
    1: {title: "启用", type: "success"},
    0: {title: "待处理", type: "danger"},
  };

  return res;
}

function integralOpts() {
  const res: IFiledMap = {
    1: "增加",
    2: "减少",
  };

  return res;
}

function goodsStatusOpts() {

  const res: OptionMap = {
    1: "上架",
    0: "下架",
  };

  return res;
}

function articleStatusOptions() {
  const res: OptionMap = {
    2: "已发布",
    1: "草稿",
  };

  return res;
}

function statusOpts() {
  const res: OptionMap = {
    1: "启用",
    0: "禁用",
  };

  return res;
}

function addressTypes() {

  const res: OptionMap = {
    2: "职工",
    1: "营养",
    0: "不限",
  };

  return res;
}

function statusOpts_2() {
  const res: OptionMap = {
    1: "已处理",
    0: "待处理",
  };

  return res;
}

function yesOrNoOpts() {
  const res: OptionMap = {
    1: "是",
    2: "否",
  };

  return res;
}

function yesOrNoOpts_1() {
  const res: OptionMap = {
    1: "是",
    0: "否",
  };

  return res;
}

function acceptOrderTypes() {

  const res: OptionMap = {
    1: "自动接单打单",
    0: "手动接单打单",
  };

  return res;
}

// 店铺状态 1 营业中  0停止营业
function supplierOpts() {
  const res: OptionMap = {
    0: "休息中",
    1: "营业中",
  };
  return res;
}

/**
 * 店铺类型
 */
function shopTypes() {
  const res: OptionMap = {
    0: "单店",
    1: "食堂",
    // 2: "普通",
  };
  return res;
}


/**
 * 店铺标签
 */
function shopLabels() {
  const res: OptionMap = {
    0: "普通",
    1: "自营",
    2: "优选",
    // 2: "普通",
  };
  return res;
}

function dailyMenuTypeOpts() {

  const res: OptionMap = {
    0: "早餐",
    1: "中餐",
    2: "晚餐",
    3: "中餐补餐",
    4: "晚餐补餐",
  };

  return res;
}

function orderStatusMapping() {

  const res: OptionMap = {
    1: "待付款",
    11: "待接单",
    12: "待出餐",
    16: "待分拣",
    17: "待配送",
    20: "已送达",
    60: "已退款",
    80: "已取消",
  };

  return res;
}


function orderPrinterTypeOptions() {

  const res: OptionMap = {
    1: "待付款",
    2: "待接单",
    3: "待出餐",
    4: "待配送"
  };

  return res;
}

/**
 * 规格类型
 */
function skusOptions() {
  const res: OptionMap = {
    10: "单规格",
    20: "多规格"
  };
  return res;
}

function stockCalTypeOptions() {

  const res: OptionMap = {
    0: "下单减库存",
    1: "付款减库存"
  };

  return res;
}

export {
  menuType,
  genderOptions,
  printerTypeOpts,
  statusOpts,
  statusOpt1,
  statusOpt2,
  statusOpts_2,
  supplierOpts,
  dailyMenuTypeOpts,
  integralOpts,
  yesOrNoOpts,
  memberTypeOpts,
  shopTypes,
  yesOrNoOpts_1,
  shopLabels,
  orderStatusMapping,
  orderPrinterTypeOptions,
  goodsStatusOpts,
  skusOptions,
  stockCalTypeOptions,
  articleStatusOptions,
  memberLabelOpts,
  shopRoleOpts,
  acceptOrderTypes,
  addressTypes
};
